import type { KujialeAssemblyModel } from "../KujialeJsonModels/KujialeAssemblyModel";
import type { KujialeParamModel } from "../KujialeJsonModels/KujialeParamModel";

export class BaseModel {
  subModels?: BaseModel[];
  kujialeModel?: KujialeParamModel[];
  doorClosed: boolean;

  constructor(){
    this.doorClosed = true;
  }
}

export class AssemblyProductModel extends BaseModel {
  kujialeAssemblyModel: KujialeAssemblyModel;
  constructor(
    models: KujialeParamModel[],
    assemblymodel: KujialeAssemblyModel
  ) {
    super();
    this.kujialeAssemblyModel = assemblymodel;
    this.kujialeModel = models;
  }
}

export class ProductModel extends BaseModel {
  constructor(model: KujialeParamModel) {
    super();
    this.kujialeModel = [model];
  }
}

export class SubModel extends BaseModel {
  constructor(model: KujialeParamModel) {
    super();
    this.kujialeModel = [model];
  }

  isDoor():boolean {
    return true;
  }
}

export class PartModel extends BaseModel {
  constructor(model: KujialeParamModel) {
    super();
    this.kujialeModel =  [model];
  }
}

export class LoftModel extends BaseModel {
  constructor(model: KujialeParamModel) {
    super();
    this.kujialeModel = [model];
  }
}

export class BoxModel extends BaseModel{
  constructor(model: KujialeParamModel) {
    super();
    this.kujialeModel = [model];
  }
}
